package com.chenwut.stringBuilderDemo;

import java.util.Scanner;

/*
    * 对称字符串
    * */
public class StringBuilderDemo3 {
    public static void main(String[] args) {
        //1.键盘录入字符串
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str = sc.next();

        //2.反转键盘录入的字符串
        StringBuilder sb = new StringBuilder();
        if(sb.append(str).reverse().toString().equals(str)){
            System.out.println("Yes，当前字符串是对称字符串");
        }else
            System.out.println("No，当前字符串不是对称字符串");
    }
}
